-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
waypoints 0.05: implement goto functionality #3659
Conversation
The code still needs refactoring, but make lint happy for now.
68145cc
to
e631221
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, two minor suggestions
"" : {title : "Select WP"}, | ||
"< Back" : mainMenu | ||
}; | ||
if (Object.keys(wp).length==0) Object.assign(menu, {"No WPs":""}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is wp
always an array? If so we could:
if (Object.keys(wp).length==0) Object.assign(menu, {"No WPs":""}); | |
if (wp.length==0) Object.assign(menu, {"No WPs":""}); |
if (Object.keys(wp).length==0) Object.assign(menu, {"No WPs":""}); | ||
else { | ||
wp.forEach((val, card) => { | ||
const name = wp[card].name; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we could save a bit of code:
const name = wp[card].name; | |
const name = val.name; |
Yeah, there's ton more optimalizations/cleanups that could be done. I'd prefer this to be applied, then I can take your patches as a separate commit, do more work on top of that, and submit it as new version after some testing? |
Not a problem, that sounds like a plan :) |
Thank you, it makes my patch flow easier. |
Update libraries, refactor and implement goto functionality